package com.qlogic.commons.utils.reflect;

import java.net.URL;
import java.net.URLClassLoader;

/**
 * A class loader for loading jar files, both local and remote.
 */
public class JarClassLoader extends URLClassLoader {

	/**
	 * Creates a new JarClassLoader for the specified url.
	 * 
	 * @param url
	 *            the url of the jar file
	 */
	public JarClassLoader() {
		super(new URL [] {});
	}

	public JarClassLoader(URL url) {
		super(new URL[] { url });
	}

	public JarClassLoader(URL[] urls) {
		super(urls);
	}

	/**
	 * Add new url to classloader path
	 */
	public void add (URL url) {
		super.addURL(url);
	}

}
